package com.sright.bcard.content.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.content.dal.dao.FavoriteCardDAO;
import com.sright.bcard.content.dal.entity.FavoriteCardDO;
import com.sright.bcard.content.dal.mapper.FavoriteCardDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class FavoriteCardDAOImpl extends BaseDAOImpl<FavoriteCardDO> implements FavoriteCardDAO {

    @Resource
    private FavoriteCardDOMapper favoriteCardDOMapper;

    @Override
    protected BaseMapper<FavoriteCardDO> getObjMapper() {
        return favoriteCardDOMapper;
    }

    @Override
    public Long selectCountByMemberId(Long memberId) {
        return favoriteCardDOMapper.selectCountByMemberId(memberId);
    }

    @Override
    public FavoriteCardDO selectByObject(FavoriteCardDO favoriteCardDO) {
        return favoriteCardDOMapper.selectByObject(favoriteCardDO);
    }

    @Override
    public List<FavoriteCardDO> selectPageList(Integer offset, String keywords, Long memberId) {
        return favoriteCardDOMapper.selectPageList(offset,keywords,memberId);
    }

    @Override
    public Integer selectCount(String keywords, Long memberId) {
        return favoriteCardDOMapper.selectCount(keywords,memberId);
    }
}
